package pattern.decorator;

public class Sugar implements IProduct{
    private IProduct product;
    public Sugar(IProduct product){
        this.product = product;
    }
    @Override
    public String getInfo() {
        return product.getInfo() + "加糖";
    }

    @Override
    public double getPrice() {
        return product.getPrice() + 2;
    }
}
